package com.test.ddaidai.main_account_approve;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;

import com.test.ddaidai.BaseActivity;
import com.test.ddaidai_android.activity.R;

public class ExtraApproveActivity extends BaseActivity {

	FragmentManager fm;
	Fragment fragment;
	FragmentTransaction tran;

	@Override
	protected void onCreate(Bundle arg0) {
		// TODO Auto-generated method stub
		super.onCreate(arg0);
		setContentView(R.layout.activity_centeraccount_main_approvemanager_extra);

		setTitle(getString(R.string.main_account_approvemanager_extra),
				R.drawable.ic_back_normal,false, 0,false);

		TextView tv_account_approvemanager_extra_require = (TextView) findViewById(R.id.tv_account_approvemanager_extra_require);
		String txt_require = tv_account_approvemanager_extra_require.getText().toString();
		Spannable WordtoSpan = new SpannableString(txt_require);        
		WordtoSpan.setSpan(new ForegroundColorSpan(Color.RED), 7, 12, 
				Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
		tv_account_approvemanager_extra_require.setText(WordtoSpan);

		fm = getSupportFragmentManager();
		fragment = new OpenAccountBankFragmnent();
		tran = fm.beginTransaction();
		tran.replace(R.id.openaccount_bank_fragmnent, fragment);
		tran.commit();

		fragment = new OpenAccountProvinceFragmnent();
		tran = fm.beginTransaction();
		tran.replace(R.id.openaccount_province_fragmnent, fragment);
		tran.commit();

		fm = getSupportFragmentManager();
		fragment = new OpenAccountCityFragmnent();
		tran = fm.beginTransaction();
		tran.replace(R.id.openaccount_city_fragmnent, fragment);
		tran.commit();


	}

}